<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>会员管理</title>
        <script language="javascript">
                function del_sure(id) {
//            var delId = $(this).parent().find('input[class="delId"]').val();
//            var delId = $(this).siblings('.delId').val();
                    var gnl = confirm("确定要删除?");
                    console.log(gnl)
                    if (gnl) {
                        $.get("${ctx}/user/delete?id="+id,function(){location.reload(true)})
                    }
                }
    </script>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            后台权限点管理
            <small>编辑后台权限点</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/main">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/sys/permissions_list">
                    后台权限点管理
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">

                    编辑后台权限点
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区----->
<div class="main">
    <form action="${ctx}/user_management" method="get">
        <div class="row">
            <div class="col-md-12">
                <div class="search">
                    <div class="form-group">
                        <label class="control-label">姓名：</label>
                        <input type="text"  name="userName" value="${userName}" class="form-control form-control-inline" name="childForm"/>
                    </div>
                    <div class="form-group" id="user-address-label">
                        <label class="control-label">注册时间：</label>

                        <div class="date-control small">
                            <div class="input-daterange input-group">
                                <input type="text" id="stime" class="form-control fromdatetime col-md-3" size="16" value="${stime}" name="stime">
                                <span class="input-group-addon"> - </span>
                                <input type="text" id="etime" class="form-control todatetime col-md-3" size="16" value="${etime}" name="etime">
                            </div>
                        </div>
                    <span class="actions">
                        <input class="btn blue" type="submit" value="搜索"/>
                    </span>
                        <span class="actions">
                        <%--<div class="text-right">--%>
                            <%--<a href="${ctx}/product/add" class="btn blue">发布基金</a>--%>
                        <%--</div>--%>
                    </span>
                    </div>
                </div>

            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <table class="table table-striped table-hover zqy-table">
                    <thead>
                    <tr>
                        <th>姓名</th>
                        <th>注册时间</th>
                        <th>删除</th>
                    </tr>
                    </thead>
                    <c:forEach var="item" items="${list}">
                        <tbody>
                        <td>${item.userName}</td>
                        <td>
                            <fmt:formatDate value="${item.regTime}" pattern="yyyy-MM-dd"/>
                        </td>
                        <td>
                            <a class="btn btn-xs js-deleteClassify"  onclick="javascript:del_sure('${item.userId}')">删除用户</a>
                        </td>
                        </tr>
                        </tbody>
                    </c:forEach>
                </table>
                <div class="text-center">
                    <ul class="pagination">
                        <paging:paging pageIndex="${pageIndex}" totalPage="${totalPage}" href="${ctx}/user_management" htmlTag="li"></paging:paging>
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<!------[end]内容区----->

</body>
</html>